package org.ushio.nchu_22201404.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.ushio.common_module.entity.CSSCR;
import org.ushio.common_module.entity.CustomerService;
import org.ushio.nchu_22201404.Foen.Admin_CSSCRClient;
import org.ushio.nchu_22201404.service.CustomerServiceService;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin(origins = "http://localhost:8080")
@RestController
public class CustomerServiceController {
    @Autowired
    private CustomerServiceService customerServiceService;

    @Resource
    private Admin_CSSCRClient adminCsscrClient;

    @RequestMapping("/getCustomerServiceInfo")
    public List<CustomerService> getCustomerServiceInfo(){

        return customerServiceService.getCustomerServiceInfo();
    }

    @GetMapping(value = "getSalaryUpdate")
    List<CSSCR> getSalaryUpdate(){

        System.out.println("6");
        return adminCsscrClient.ListSalaryUpdate();
    }
}